package com.sunni.service.Impl;

import com.sunni.entity.Department;
import com.sunni.entity.Permission;
import com.sunni.mapper.DepartmentMapper;
import com.sunni.mapper.PermissionMapper;
import com.sunni.service.DepartmentService;
import com.sunni.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class PermissionServiceImpl implements PermissionService {

    @Autowired
    private PermissionMapper permissionMapper;

    @Override
    public List<Permission> selectAll() {
        return permissionMapper.selectAll();
    }

    @Override
    public List<Permission> selectAllByRid(Long rid) {
        return permissionMapper.selectAllByRid(rid);
    }
}
